在專案根目錄建立/更新 README.md
# Fan Toolbox (追星助手) - AI-Powered All-in-One K-Pop Assistant



> 一款基於 Flutter 與 Clean Architecture 打造的綜合型追星神器,整合 AI 即時雙語同傳、自訂飯圈字典、直播重點摘要、行程提醒、開銷記帳與周邊整理。
---
## 核心功能 (Core Features)
- 即時雙語同傳與 AI 直播摘要 (Live Translate & AI Summary)
- Whisper STT + GPT-4o-mini:低延遲語音轉文字與在地化繁體中文翻譯。
- Context-Aware Sliding Window:保持上下文連貫,解決口語倒裝句與代名詞斷句。
- AI 直播精華:一鍵將長直播自動生成條列式重點筆記。
- 自訂專屬偶像字典 (Dynamic Fandom Dictionary)
- 本地 Hive / SharedPreferences 持久化儲存。
- Dynamic Prompt Injection:將自訂成員暱稱與飯圈梗即時注入 System Prompt,譯名 100% 精準。
- 行程提醒與賽事推播 (Schedule & Local Notifications)
- 跨時區排程推播(`flutter_local_notifications`),搶票、直播與球賽開球時間不漏接。
- 追星專屬記帳 (Expense Tracker)
- 分類統計門票、專輯、周邊與應援花費,提供預算提醒與圖表分析。
- 周邊與小卡整理 (Collection Manager)
- 多媒體與 Tag 標籤索引,快速分類搜尋大批量小卡與影音資源。
- 高可用與效能防禦 (Resilience & Cost Optimization)
- RMS VAD (Voice Activity Detection):自動過濾白噪音與無聲片段,節省 45%+ API 費用。
- 全域 `AppException` 體系:結合 Debouncer 防連擊與 Exponential Backoff 指數退避重試。
---
##系統架構 (Architecture)
本專案嚴格遵循Clean Architecture與Feature-driven模組化目錄結構:
```text
lib/
├── core/ # 全域公用模組
│ ├── errors/ # AppException 錯誤處理體系
│ ├── network/ # 指數退避重試與 Client 封裝
│ └── utils/ # Debouncer, VAD 降噪工具
│
├── features/ # 功能模組 (Feature-driven)
│ ├── live_translate/ # 即時同傳 & 字典 & AI 摘要
│ ├── schedule/ # 行程與本地推播提醒
│ ├── expense/ # 追星記帳與統計圖表
│ └── collection/ # 周邊與小卡分類管理
│
└── main.dart # App 入口點
git clone https://github.com/your-username/fan-toolbox.git
cd fan-toolbox
flutter pub get
.env.example 並重新命名為 .env
cp .env.example .env
編輯 .env 檔案並填入你的 OpenAI API Key
OPENAI_API_KEY=your_openai_api_key_here
flutter run